<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>Firmware for Arduino | PLEN Project Company Inc.: PLEN2::Motion::Frame Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Firmware for Arduino | PLEN Project Company Inc.
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_p_l_e_n2_1_1_motion_1_1_frame.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="class_p_l_e_n2_1_1_motion_1_1_frame-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">PLEN2::Motion::Frame Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Class of a motion frame.  
 <a href="class_p_l_e_n2_1_1_motion_1_1_frame.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_motion_8h_source.html">Motion.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a8f32649e6ff9fab7577faffdd4dd5180"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="class_p_l_e_n2_1_1_motion_1_1_frame.html#a8f32649e6ff9fab7577faffdd4dd5180a8af3f86dd6ba286a3c30b6f102e302e1">UPDATE_INTERVAL_MS</a> = 32, 
<a class="el" href="class_p_l_e_n2_1_1_motion_1_1_frame.html#a8f32649e6ff9fab7577faffdd4dd5180a627da90111ae501ec29ce273f1f0c711">FRAME_BEGIN</a> = 0, 
<a class="el" href="class_p_l_e_n2_1_1_motion_1_1_frame.html#a8f32649e6ff9fab7577faffdd4dd5180a7b134ae0dc9f5eddac5ed85e47860651">FRAME_END</a> = 20
 }</td></tr>
<tr class="separator:a8f32649e6ff9fab7577faffdd4dd5180"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ac197664252a28a848ce72588dc5833ea"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_l_e_n2_1_1_motion_1_1_frame.html#ac197664252a28a848ce72588dc5833ea">init</a> (<a class="el" href="class_p_l_e_n2_1_1_motion_1_1_frame.html">Frame</a> &amp;frame)</td></tr>
<tr class="memdesc:ac197664252a28a848ce72588dc5833ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the frame.  <a href="#ac197664252a28a848ce72588dc5833ea">More...</a><br /></td></tr>
<tr class="separator:ac197664252a28a848ce72588dc5833ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a474a9fe12916f5e4d2e28795632fa10f"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_l_e_n2_1_1_motion_1_1_frame.html#a474a9fe12916f5e4d2e28795632fa10f">set</a> (uint8_t slot, uint8_t <a class="el" href="class_p_l_e_n2_1_1_motion_1_1_frame.html#a33e5db0f638c3899800d21c6110d0020">index</a>, const <a class="el" href="class_p_l_e_n2_1_1_motion_1_1_frame.html">Frame</a> &amp;frame)</td></tr>
<tr class="memdesc:a474a9fe12916f5e4d2e28795632fa10f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write the frame to external EEPROM.  <a href="#a474a9fe12916f5e4d2e28795632fa10f">More...</a><br /></td></tr>
<tr class="separator:a474a9fe12916f5e4d2e28795632fa10f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0520137ea9deb393d5097abc7dc1dba8"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_l_e_n2_1_1_motion_1_1_frame.html#a0520137ea9deb393d5097abc7dc1dba8">get</a> (uint8_t slot, uint8_t <a class="el" href="class_p_l_e_n2_1_1_motion_1_1_frame.html#a33e5db0f638c3899800d21c6110d0020">index</a>, <a class="el" href="class_p_l_e_n2_1_1_motion_1_1_frame.html">Frame</a> &amp;frame)</td></tr>
<tr class="memdesc:a0520137ea9deb393d5097abc7dc1dba8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read the frame from external EEPROM.  <a href="#a0520137ea9deb393d5097abc7dc1dba8">More...</a><br /></td></tr>
<tr class="separator:a0520137ea9deb393d5097abc7dc1dba8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a33e5db0f638c3899800d21c6110d0020"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_l_e_n2_1_1_motion_1_1_frame.html#a33e5db0f638c3899800d21c6110d0020">index</a></td></tr>
<tr class="memdesc:a33e5db0f638c3899800d21c6110d0020"><td class="mdescLeft">&#160;</td><td class="mdescRight">Index of a frame.  <a href="#a33e5db0f638c3899800d21c6110d0020">More...</a><br /></td></tr>
<tr class="separator:a33e5db0f638c3899800d21c6110d0020"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac967f74e67c36a84f2754650e61c8d5a"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_l_e_n2_1_1_motion_1_1_frame.html#ac967f74e67c36a84f2754650e61c8d5a">transition_time_ms</a></td></tr>
<tr class="memdesc:ac967f74e67c36a84f2754650e61c8d5a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Time of transit to the frame.  <a href="#ac967f74e67c36a84f2754650e61c8d5a">More...</a><br /></td></tr>
<tr class="separator:ac967f74e67c36a84f2754650e61c8d5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6c8b2616097fa2f637ec7a7a20a38d1"><td class="memItemLeft" align="right" valign="top">int16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_l_e_n2_1_1_motion_1_1_frame.html#aa6c8b2616097fa2f637ec7a7a20a38d1">joint_angle</a> [<a class="el" href="class_p_l_e_n2_1_1_joint_controller.html#a9c7a945eb7123c6eb994bd852d026658a8bd0c873ca3e8f227523356f9d09821d">JointController::JOINTS_SUM</a>]</td></tr>
<tr class="memdesc:aa6c8b2616097fa2f637ec7a7a20a38d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Angles.  <a href="#aa6c8b2616097fa2f637ec7a7a20a38d1">More...</a><br /></td></tr>
<tr class="separator:aa6c8b2616097fa2f637ec7a7a20a38d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class of a motion frame. </p>
<dl class="section attention"><dt>Attention</dt><dd>The firmware backs up memory allocation of an instance to external EEPROM, so if you change the order of member instances, PLEN does not work properly if you did not re-install all motions. </dd></dl>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="a8f32649e6ff9fab7577faffdd4dd5180"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a8f32649e6ff9fab7577faffdd4dd5180a8af3f86dd6ba286a3c30b6f102e302e1"></a>UPDATE_INTERVAL_MS&#160;</td><td class="fielddoc">
<p>Update interval between frames. </p>
<dl class="section see"><dt>See also</dt><dd>Refer to ISR(TIMER1_OVF_vect), in JointController.cpp. </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a8f32649e6ff9fab7577faffdd4dd5180a627da90111ae501ec29ce273f1f0c711"></a>FRAME_BEGIN&#160;</td><td class="fielddoc">
<p>Beginning value of frames. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a8f32649e6ff9fab7577faffdd4dd5180a7b134ae0dc9f5eddac5ed85e47860651"></a>FRAME_END&#160;</td><td class="fielddoc">
<p>Ending value of frames. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a0520137ea9deb393d5097abc7dc1dba8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool PLEN2::Motion::Frame::get </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>slot</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_p_l_e_n2_1_1_motion_1_1_frame.html">Frame</a> &amp;&#160;</td>
          <td class="paramname"><em>frame</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Read the frame from external EEPROM. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">slot</td><td>Slot number of a motion. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>Index of the frame. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">frame</td><td>An instance of frame.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Result </dd></dl>

</div>
</div>
<a class="anchor" id="ac197664252a28a848ce72588dc5833ea"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void PLEN2::Motion::Frame::init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_p_l_e_n2_1_1_motion_1_1_frame.html">Frame</a> &amp;&#160;</td>
          <td class="paramname"><em>frame</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Initialize the frame. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">frame</td><td>An instance of frame. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a474a9fe12916f5e4d2e28795632fa10f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool PLEN2::Motion::Frame::set </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>slot</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_p_l_e_n2_1_1_motion_1_1_frame.html">Frame</a> &amp;&#160;</td>
          <td class="paramname"><em>frame</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Write the frame to external EEPROM. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">slot</td><td>Slot number of a motion. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>Index of the frame. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">frame</td><td>An instance of frame.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Result </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a33e5db0f638c3899800d21c6110d0020"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t PLEN2::Motion::Frame::index</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Index of a frame. </p>

</div>
</div>
<a class="anchor" id="aa6c8b2616097fa2f637ec7a7a20a38d1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int16_t PLEN2::Motion::Frame::joint_angle[<a class="el" href="class_p_l_e_n2_1_1_joint_controller.html#a9c7a945eb7123c6eb994bd852d026658a8bd0c873ca3e8f227523356f9d09821d">JointController::JOINTS_SUM</a>]</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Angles. </p>

</div>
</div>
<a class="anchor" id="ac967f74e67c36a84f2754650e61c8d5a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t PLEN2::Motion::Frame::transition_time_ms</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Time of transit to the frame. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_motion_8h_source.html">Motion.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespace_p_l_e_n2.html">PLEN2</a></li><li class="navelem"><a class="el" href="namespace_p_l_e_n2_1_1_motion.html">Motion</a></li><li class="navelem"><a class="el" href="class_p_l_e_n2_1_1_motion_1_1_frame.html">Frame</a></li>
    <li class="footer">Generated on Tue Oct 11 2016 13:20:21 for Firmware for Arduino | PLEN Project Company Inc. by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
